home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / fgdemo10.zip / FGDEMO.DOC < prev    next >
Text File  |  1991-10-05  |  17KB  |  330 lines

  1.  
  2.                              FGDEMO version 1.0
  3.  
  4.        -----------------------------------------------------------
  5.        FGDEMO:  the demo program for Fastgraph and Fastgraph/Light
  6.        -----------------------------------------------------------
  7.  
  8. This program illustrates some of the features of the Fastgraph (tm)
  9. graphics library.  It was written by Diana Gruber, senior programmer at
  10. Ted Gruber Software.  You can contact Ted Gruber Software at the address
  11. and phone numbers listed at the bottom of this file.
  12.  
  13. FGDEMO is distributed with source code.  It was originally compiled with
  14. the Microsoft C 5.1 medium memory model.  You may use the source code in
  15. FGDEMO in your own applications.  This program requires either Fastgraph
  16. or Fastgraph/Light (tm) to link.  If you want to use this code, and you
  17. don't have a copy of Fastgraph, please contact Ted Gruber Software.
  18.  
  19.                              ---------------
  20.                              Starting FGDEMO
  21.                              ---------------
  22.  
  23. You can install FGDEMO on a hard disk or run it from diskette.  Just type
  24. FGDEMO at the DOS command prompt.  To install FGDEMO on a hard disk,
  25. create a subdirectory and copy all the files from the diskette to the
  26. subdirectory.
  27.  
  28.                                -----------
  29.                                Video modes
  30.                                -----------
  31.  
  32. FGDEMO runs in a choice of 4 video modes:
  33.  
  34.    640x200 2-color CGA
  35.    640x200 16-color EGA
  36.    640x350 16-color EGA
  37.    720x348 Hercules monochrome
  38.  
  39. When you start the program, you will be given a default video mode choice,
  40. and an opportunity to change to one of the other video modes.  We suggest
  41. you try all of them, and see what they look like.  Note that some of
  42. these video modes may not be available on your system.
  43.  
  44.                               --------------
  45.                               Running FGDEMO
  46.                               --------------
  47.  
  48. After you start FGDEMO and choose a video mode, an attractive horizontal
  49. menu bar will appear at the top of the screen.  Press any key or click
  50. the left mouse button to get the first pull-down vertical menu.  Select a
  51. feature from this or any menu.  The menus are intuitive.  Select and try
  52. all the features on all the menus.
  53.  
  54.                            -------------------
  55.                            Distributing FGDEMO
  56.                            -------------------
  57.  
  58. You may freely distribute FGDEMO as long as all the files are distributed
  59. together in their original unaltered state.  If you want to zip the files
  60. together for BBS distribution, please use the file name FGDEMO10.ZIP for 
  61. version 1.0 of FGDEMO.  The following files are included in the FGDEMO
  62. distribution:
  63.  
  64.     Files required to run FGDEMO
  65.     ----------------------------
  66.     FGDEMO   EXE  - the program
  67.     08PT     FNT  - font files (packed pixel run format)
  68.     14PT     FNT
  69.     CASINO   PPR  - graphic file (packed pixel run format)
  70.     ORDER    FRM  - order form (can be printed from File menu)
  71.  
  72.     Documentation
  73.     -------------
  74.     FGDEMO   DOC  - this file
  75.  
  76.     Source code for FGDEMO
  77.     ----------------------
  78.     CHAR     C   - character display and management functions
  79.     COMMON   C   - initialization, termination, general i/o functions
  80.     DISPLAY  C   - functions on Display submenu
  81.     EDITOR   C   - text editor functions
  82.     FGDEMO   C   - function main and screen drawing functions
  83.     FILE     C   - functions on File submenu
  84.     FUNDMTLS C   - functions on Fundamentals submenu
  85.     MENU     C   - define and manage the horizontal and vertical menus
  86.     MISC     C   - functions on Miscellaneous submenu
  87.     UTILITY  C   - functions on Utilities submenu
  88.     VIDEO    C   - functions on Video submenu
  89.  
  90.     Header files
  91.     ------------
  92.     DEFS     H   - general declarations and initializations
  93.     BITMAPS  H   - TNT and "Kablooy" bitmaps for explosion
  94.     CHAR     H   - these files contain the function declarations.
  95.     COMMON   H     Each one is associated with a source code file.
  96.     DISPLAY  H     The Microsoft C compiler creates these files
  97.     EDITOR   H     when the /Zg switch is used.
  98.     FGDEMO   H
  99.     FILE     H
  100.     FUNDMTLS H
  101.     MENU     H
  102.     MISC     H
  103.     UTILITY  H
  104.     VIDEO    H
  105.  
  106.     Make files
  107.     ----------
  108.     BUILD    BAT - batch file to compile and link FGDEMO with Turbo C
  109.     FGDEMO   PRJ - project make file for Turbo C
  110.     WORK         - make file for Microsoft C
  111.  
  112.                        ----------------------------
  113.                        Compiling and linking FGDEMO
  114.                        ----------------------------
  115.  
  116. The source code files may be recompiled using either Microsoft C or Turbo
  117. C.  The medium memory model is recommended, and the large model will also
  118. work.  FGDEMO is too big to use the small memory model.
  119.  
  120. If you are using Microsoft C, use the make file WORK to compile and link
  121. FGDEMO with the Fastgraph/Light medium model library.  If you want to
  122. link FGDEMO with Fastgraph instead of Fastgraph/Light, change the library
  123. name FGLM to FGM in the LINK command.
  124.  
  125. If you are using Turbo C, Turbo C++, or Borland C++, use the project make
  126. file FGDEMO.PRJ to compile and link FGDEMO.  Be sure you've configured
  127. the compiler to use the medium memory model.  Alternatively, you can use
  128. the command file BUILD.BAT to perform the compilation and linking.
  129. BUILD.BAT uses the TCC command; you may need to change it for Turbo C++
  130. or Borland C++.  If you want to link FGDEMO with Fastgraph instead of
  131. Fastgraph/Light, change the library name FGLM to FGM in the TLINK
  132. command, or in the last line of the project make file.
  133.  
  134. You may have trouble running FGDEMO in the 640x200x16 color mode in the
  135. Turbo C integrated development environment.  That is because the
  136. environment allocates all available memory, making it impossible for
  137. Fastgraph to allocate a virtual video page.  FGDEMO requires two video
  138. pages.  You should be able to run FGDEMO in the other video modes, and
  139. you should have no trouble compiling, linking, and running FGDEMO from
  140. the DOS command line.
  141.  
  142. We have had some reports of trouble with older versions of TLINK finding
  143. the Fastgraph or Fastgraph/Light libraries.  If you have this problem, be
  144. sure the full path name of the library appears in your TLINK.CFG file. If
  145. that does not solve the problem, include the full library path name in
  146. the TLINK command.  We called Borland technical support about this
  147. problem, and they told us there is no TLINK.CFG file supported in Turbo C
  148. version 2.0, but it is supported in Turbo C++ and Borland C++.
  149.  
  150.                           ----------------------
  151.                           About the FGDEMO menus
  152.                           ----------------------
  153.  
  154. The menu structure is defined in the file DEFS.H.  A typdef CMD is
  155. defined which is a structure containing information about each menu
  156. item:  the function called when the menu choice is activated, the 
  157. descriptive name of the menu item, the x and y location of the menu item,
  158. and pointers to the next and previous items on the menu.  Each menu is
  159. defined by an array of these structures, and is initialized at the top of
  160. MENU.C.  
  161.  
  162. There are two types of menus:  a horizontal menu, which is the moving bar
  163. menu at the top of the screen, and vertical menus, also known as 
  164. "pull-down" menus.  When a pull-down menu is visible, a menu function may
  165. be activated by either clicking the mouse on a highlighted menu function,
  166. or by pressing <Enter>.  Arrow keys are used to highlight the next and
  167. previous menu item, and a mouse may also be used.
  168.  
  169. User input relevant to the menus is accepted in two places:  within the
  170. vertical_menu function (to activate a menu choice), or in the main
  171. function (to control the horizontal menu).  The horizontal menu is also
  172. controlled within the vertical menu, to the extent that if an arrow key
  173. is pressed, the next or previous pull-down menu becomes active.
  174.  
  175. The entire screen, including the horizontal menu and the dithered
  176. background, is drawn at the beginning of the program and stored on the
  177. hidden p